package cn.lopr.im.api.dao;

import cn.lopr.im.api.bean.Article;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ArticleMapper {

    int insert(Article record);

    int insertSelective(Article record);

    Article selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(Article record);

    int updateByPrimaryKey(Article record);

    List<Article> selectByPlateIdOrUserIdAndPage(String plateID, String publishUserId);

    List<Article> selectByRecord(Article article);

    int countArticleLikeByUserId(Integer publishUserId);

    int countArticleVisitByUserId(Integer publishUserId);

    int updateByPrimaryKeyAndType(String articleId, int type, int num);
}